const webpackDevServer = require('webpack-dev-server')
const webpack = require('webpack')

const config = webpack.config.js

const options = {
    contentBase: './dist',
    hot: true,
    host: 'localhost',
    port: 3003
}

webpackDevServer.addDevServerEntrypoints(config, options)

const complier = webpack(config)

const server = new webpackDevServer(complier, options)

server.listen(options.port, options.host, () => {
    console.log(`Example app listening on port ${options.port}\n`)
})